<%@ page contentType="text/html; charset=iso-8859-1" language="java" import="java.sql.*" errorPage="" %>
<%
// *** Restrict Access To Page: Grant or deny access to this page
String MM_authorizedUsers="146240,151945,152786,153948";
String MM_authFailedURL="../login.jsp";
boolean MM_grantAccess=false;
if (session.getValue("MM_Username") != null && !session.getValue("MM_Username").equals("")) {
  if (false || (session.getValue("MM_UserAuthorization")=="") || 
          (MM_authorizedUsers.indexOf((String)session.getValue("MM_UserAuthorization")) >=0)) {
    MM_grantAccess = true;
  }
}
if (!MM_grantAccess) {
  String MM_qsChar = "?";
  if (MM_authFailedURL.indexOf("?") >= 0) MM_qsChar = "&";
  String MM_referrer = request.getRequestURI();
  if (request.getQueryString() != null) MM_referrer = MM_referrer + "?" + request.getQueryString();
  MM_authFailedURL = MM_authFailedURL + MM_qsChar + "accessdenied=" + java.net.URLEncoder.encode(MM_referrer);
  response.sendRedirect(response.encodeRedirectURL(MM_authFailedURL));
  return;
}
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>POWA Store [new item Picture]</title>
</head>

<body>
<%	String newName =session.getAttribute("newProductName").toString();
	session.setAttribute("newProductName",null);
%>
Upload Picture...
<form method="post" action="uploadFile.jsp" name="uploadform" enctype="multipart/form-data">    
  <table width="395" border="0" > 
     
    <tr>    
      <td>File New Name :</td>
      <td width="262"><%out.println("\""+newName+"\"");%><input type="hidden" name="productName" value=<%out.println("\""+newName+"\"");%> ></td>
    </tr><tr>
      <td width="123" height="50"></td><td><p>
        <input name="uploadfile" type="file" size="30" >please make sure the file is gif file dimension 80x158</p>
        </td>    
    </tr>
    <tr>    
      <td height="26" colspan="2" align="center">   
        <input type="submit" name="Submit" value="Upload">    
        <input type="reset" name="Reset" value="Cancel">      </td>
    </tr>    
  </table>      
</form>    
</body>
</html>
